{include file="header.html"}
<div id="page_main" class="main-right">
  <div id="rightTop">
    <p>{$lang.store_manage}</p>
    <ul class="subnav">
      <li><a class="btn1" href="{url route='store/index'}">{$lang.manage}</a></li>
      <li><a class="btn1" href="{url route='store/index' state='applying'}">{$lang.wait_verify}</a></li>
      <li><span>店铺审核</span></li>
    </ul>
  </div>
  <!-- 操作说明 -->
  <div class="explanation" id="explanation">
    <div class="title" id="checkZoom"> <i class="fa fa-lightbulb-o"></i>
      <h4 title="操作提示">操作提示</h4>
      <span id="explanationZoom" title="收起提示"></span> </div>
    <ul>
      <li><i class="fa fa-angle-double-right"></i> 点击同意，店铺即可正常运营。</li>
      <li><i class="fa fa-angle-double-right"></i> 点击拒绝，须填写拒绝原因，拒绝后该店铺信息将被删除</li>
    </ul>
  </div>
  <div class="info">
    <form method="post">
      <table class="infoTable">
        <tr>
          <th class="paddingT15">{$lang.owner_real_name}:</th>
          <td class="paddingT15 wordSpacing5">{$store.owner_name|escape}</td>
        </tr>
        <tr>
          <th class="paddingT15">{$lang.identity_card}:</th>
          <td class="paddingT15 wordSpacing5">{$store.identity_card|escape}</td>
        </tr>
        <tr>
          <th class="paddingT15">{$lang.store_name}:</th>
          <td class="paddingT15 wordSpacing5">{$store.store_name|escape}</td>
        </tr>
        <!--<tr>
        <th class="paddingT15">{$lang.scategory}:</th>
        <td class="paddingT15 wordSpacing5" >{foreach from=$scates item=cate}{$cate.cate_name|escape}&nbsp;{/foreach}</td>
      </tr>-->
        <tr>
          <th class="paddingT15">{$lang.region}:</th>
          <td class="paddingT15 wordSpacing5" >{$store.region_name|escape}</td>
        </tr>
        <tr>
          <th class="paddingT15">{$lang.address}:</th>
          <td class="paddingT15 wordSpacing5">{$store.address|escape}</td>
        </tr>
        <tr>
          <th class="paddingT15">{$lang.zipcode}:</th>
          <td class="paddingT15 wordSpacing5">{$store.zipcode|escape}</td>
        </tr>
        <tr>
          <th class="paddingT15">{$lang.tel}:</th>
          <td class="paddingT15 wordSpacing5">{$store.tel|escape}</td>
        </tr>
        <tr>
          <th class="paddingT15">{$lang.sgrade}:</th>
          <td class="paddingT15 wordSpacing5">{$store.sgrade}</td>
        </tr>
        <tr>
          <th class="paddingT15">{$lang.apply_remark}:</th>
          <td class="paddingT15 wordSpacing5">{$store.apply_remark|escape|nl2br}</td>
        </tr>
        <tr>
          <th class="paddingT15">{$lang.uploaded_image}:</th>
          <td class="paddingT15 wordSpacing5"> {if $store.identity_front}<a href="{$store.identity_front|url_format}" target="_blank" class="mr20" ><img src="{$store.identity_front|url_format}" alt="{$lang.view}" height="30"/></a>{/if}
            {if $store.identity_back}<a href="{$store.identity_back}" target="_blank" class="mr20"><img src="{$store.identity_back|url_format}" alt="{$lang.view}" height="30"/></a>{/if}
            {if $store.business_license}<a href="{$store.business_license|url_format}" target="_blank"  class="mr20"><img src="{$store.business_license|url_format}" alt="{$lang.view}" height="30"/></a>{/if} </td>
        </tr>
        <tr>
          <th class="paddingT15" valign="top">{$lang.reject_reason}:</th>
          <td class="paddingT15 wordSpacing5"><textarea name="reason" cols="60" rows="4" id="reject_reason"></textarea></td>
        </tr>
        <tr>
          <th></th>
          <td class="ptb20"><input type="hidden" id="action" name="action" value="agree" />
            <input class="formbtn" type="submit" id="agree" value="{$lang.agree}" />
            <input class="formbtn" type="button" id="reject" value="{$lang.reject}" /></td>
        </tr>
      </table>
    </form>
  </div>
</div>
<script type="text/javascript">
//<!CDATA[
$(function(){
    $("#reject").click(function(){
      var reason = $.trim($("#reject_reason").val());
      if (reason == '') {
        layer.msg(lang.input_reason);
          return false;
      }
		  $('#action').val('reject');
		  var type = $(this).parents('form').attr('method').toUpperCase();
		  var url =  window.location.href; 
		  var fromObj = $(this).parents('form');
		  ajaxSubmit(type,url,fromObj);
		  return false;
    });
	
	  $("#agree").click(function(){
		  $('#action').val('agree');
		  $('#reject_reason').val('');
		  var type = $(this).parents('form').attr('method').toUpperCase();
		  var url =  window.location.href; 
		  var fromObj = $(this).parents('form');
		  ajaxSubmit(type,url,fromObj);
		  return false;
	  });
});
//]]>
</script> 
{include file="footer.html"}